<?php session_start();
$_SESSION['aaa'] = 11;
echo session_id();
?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
<title>SWFUpload Demos - Simple Demo</title>
<link href="../../trunk/static/css/reset.css" type="text/css" rel="stylesheet" />
<link href="../../trunk/static/css/global.css" type="text/css" rel="stylesheet" />
<link href="js/default.css" rel="stylesheet" type="text/css" />

    <link rel="stylesheet" href="Jcrop/css/jquery.Jcrop.css" type="text/css" />

<script type="text/javascript" src="../jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="../../trunk/static/js/common.js"></script>
<script type="text/javascript" src="js/swfupload.js"></script>
<script type="text/javascript" src="js/swfupload.queue.js"></script>
<script type="text/javascript" src="js/fileprogress.js"></script>
<script type="text/javascript" src="js/handlers.js"></script>    
<script type="text/javascript" src="js/cutavatar.js"></script>
<script src="Jcrop/js/jquery.Jcrop.js" type="text/javascript"></script>

<script type="text/javascript">
		var swfu;

		window.onload = function() {
			var settings = {
				flash_url : "js/swfupload.swf",
				flash9_url : "js/swfupload_fp9.swf",
				upload_url: "upload.php",
				post_params: {"PHPSESSID" : "<?php echo session_id(); ?>"},
				file_size_limit : "10000 MB",
				file_types : "*.*",
				file_types_description : "All Files",
				file_upload_limit : 0,
				file_queue_limit : 1,
				custom_settings : {
					progressTarget : "fsUploadProgress",
					cancelButtonId : "btnCancel",
                    thumbnail_width: 360,
                    thumbnail_height: 360,
                    thumbnail_quality: 100
				},
				debug: true,

				button_image_url: "",
				button_width: 75,
				button_height: 28,
				button_placeholder_id: "btupload",
				button_text_left_padding: 12,
				button_text_top_padding: 3,
                button_window_mode: SWFUpload.WINDOW_MODE.TRANSPARENT,
                button_cursor: SWFUpload.CURSOR.HAND,
                button_action : SWFUpload.BUTTON_ACTION.SELECT_FILE,
				
				swfupload_preload_handler : preLoad,
				swfupload_load_failed_handler : loadFailed,
				file_queued_handler : fileQueued,
				file_queue_error_handler : fileQueueError,
				file_dialog_complete_handler : fileDialogComplete,
				upload_start_handler : uploadStart,
				upload_progress_handler : uploadProgress,
				upload_error_handler : uploadError,
				upload_success_handler : uploadSuccess,
				upload_complete_handler : uploadComplete,
				queue_complete_handler : queueComplete
			};
			swfu = new SWFUpload(settings);
	     };
	</script>
</head>
<body>
    <div class="clearfix">
        <div class="addnew"><span id="btupload"></span></div>
        <span id="btnCancel" class="hidden"></span>
        <div id="fsUploadProgress"></div>
    </div>
    <div id="thumbnails" class="mt10"></div>

    <div id="bigwarp">
        <div id="big">
            <img src="" width="200" height="200" class="preview" alt="大尺寸头像" />
        </div>
        <div class="fl wf100">大尺寸头像</div>
    </div>
    <div id="midsmlwarp">
        <div id="mid">
            <img src="" width="120" height="120" class="preview" alt="中尺寸头像" />
        </div>
        <div class="fl wf100 pb10">中尺寸头像</div>
        <div id="sml">
            <img src="" width="50" height="50" class="preview" alt="小尺寸头像" />
        </div>
        <div class="fl wf100">小尺寸头像</div>
    </div>
    <div class="cb pt10">
        <input class="btnCancel" type="submit" value="保存" />
    </div>
<style>
    #bigwarp, #midsmlwarp{
        margin:10px 0 0 10px;
        float:left;
        text-align:center;
    }
    #bigwarp{width:200px}
    #midsmlwarp{width:120px}
    #big, #mid, #sml{
        overflow:hidden;
        margin:0 auto;
    }
    #big{
        width:200px;
        height:200px;
    }
    #mid{
        width:120px;
        height:120px;
    }
    #sml{
        width:50px;
        height:50px;
    }
    #thumbnails{
        width:360px;
        height:360px;
        background:url("images/upbg.png") center center no-repeat;
        float: left;
        border:1px #C5C5C5 solid;
        position: relative;
    }
   .btnCancel, .addnew{
        float:left;
        background: url(images/swfBtn.png) no-repeat;
        margin-right:10px;
        width:75px;
        height:28px;
        line-height:28px;font-weight:700; color:#FFF}
    .btnCancel{vertical-align:middle;border:none;cursor:pointer;}
    .addnew{background-position: left bottom;}
    </style>
</body>
</html>
